package com.luoluo.service;

import com.luoluo.bean.Document;
import com.luoluo.dao.DocumentDao;
import com.luoluo.search.SearchTools;

public class DocumentService {
	private DocumentDao dao;

	public DocumentDao getDao() {
		return dao;
	}

	public void setDao(DocumentDao dao) {
		this.dao = dao;
	}

	public void insert(Document doc) {
		dao.insert(doc);
		SearchTools.add(doc);
	}

	public void update(Document doc) {
		dao.update(doc);
		SearchTools.update(doc);
	}

	public void delete(Document doc) {
		dao.delete(doc);
		SearchTools.delete(doc);
	}
}
